import axios from 'axios';
import {ajax,base} from './config'

/**
*用户组
*/
//用户组列表数据
export const userGroupData = params => { return axios.post(`${base}userGroupController.do?datagrid`, params); };
//删除用户组
export const userGroupDel = params => { return ajax.postData({url:`${base}userGroupController.do?doDel`, params}); };
//录入用户组，参数：deptName，deptId，userGroupName
export const userGroupAdd = params => { return ajax.postData({url:`${base}userGroupController.do?doAdd`, params}); };
//批量删除，参数：ids
export const userGroupBatchDel = params => { return ajax.postData({url:`${base}userGroupController.do?doBatchDel`, params}); };
//编辑用户组
export const userGroupEdit = params => { return ajax.postData({url:`${base}userGroupController.do?doUpdate`, params}); };
//获取用户列表
export const getUserTable = params => { return axios.post(`${base}groupUserController.do?datagrid`, params); };
//删除用户
export const userDel = params => { return ajax.postData({url:`${base}groupUserController.do?doDel`, params}); };
//可添加用户的列表
export const addUserToGroupList = params => { return axios.post(`${base}groupUserController.do?addUserToGroupList`, params); };
//添加用户提交，参数：userIds
export const doAddUserToGroupList = params => { return ajax.postData({url:`${base}groupUserController.do?doAddUserToGroupList`, params}); };